package com.xiaochong.tir.trades.mqrevTrades;

import com.xiaochong.tir.trades.component.DataSaveHbaseCommon;
import com.xiaochong.tir.trades.rabbit.HuobiproMqQueue;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * Created by admin on 2018/6/16.
 */
@Component
public class HuobiproRevTrades {
    @Resource
    private DataSaveHbaseCommon mqDataSaveHbaseCommon;

    @RabbitListener(queues = HuobiproMqQueue.QUEUE_TRADES_HUOBIPRO_USDT)
    @RabbitHandler
    public void processHuobiproXrpUsdt(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }

    @RabbitListener(queues = HuobiproMqQueue.QUEUE_TRADES_HUOBIPRO_BTC)
    @RabbitHandler
    public void processHuobiproBtc(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }

    @RabbitListener(queues = HuobiproMqQueue.QUEUE_TRADES_HUOBIPRO_ETH)
    @RabbitHandler
    public void processHuobiproEth(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }

    @RabbitListener(queues = HuobiproMqQueue.QUEUE_TRADES_HUOBIPRO_HT)
    @RabbitHandler
    public void processHuobiproHt(byte[] body) {
        mqDataSaveHbaseCommon.MqDataSaveTradesAction(body);
    }
}
